<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>眼镜店-用户中心</title>
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/main.css">
</head>
<body>
	<div class="header_con">
		<div class="header">
			<div class="welcome fl">欢迎来到我的眼镜店!</div>
			<div class="fr">
				<%
					if( request.getSession().getAttribute("uname") == null ){
				%>
						<div class="login_btn fl">
							<a href="login.html">登录</a>
							<span>|</span>
							<a href="register.html">注册</a>
						</div>
				<%
					}else{
						String uname=request.getSession().getAttribute("uname")+"";
				%>
						<div class="login_info fl" style="display:block">
							欢迎您：<em><%=uname %></em>
						</div>
				<%
					}
				%>
				<div class="user_link fl">
					<span>|</span>
					<a href="user_center_info.jsp">用户中心</a>
					<span>|</span>
					<a href="checkout.jsp">我的购物车</a>
					<span>|</span>
					<a href="user_center_order.jsp">我的订单</a>
				</div>
			</div>
		</div>		
	</div>

	<div class="search_bar clearfix">
		<b class="sub_page_name fl">&nbsp;&nbsp;&nbsp;&nbsp;用户中心</b>
		<div class="search_con fr">
			<input type="text" class="input_text fl" name="" placeholder="搜索商品">
			<input type="button" class="input_btn fr" name="" value="搜索">
		</div>		
	</div>

	<div class="main_con clearfix">
		<div class="left_menu_con clearfix">
			<h3>用户中心</h3>
			<ul>
				<li><a href="user_center_info.jsp" class="active">· 个人信息</a></li>
				<li><a href="user_center_order.jsp">· 全部订单</a></li>
				<li><a href="user_center_site.jsp">· 收货地址</a></li>
			</ul>
		</div>
		<div class="right_content clearfix">
				<div class="info_con clearfix">
				<h3 class="common_title2">基本信息</h3>
						<ul class="user_info_list" id="info">
										
						</ul>
				</div>
		</div>
	</div>



	<div class="footer">
		<div class="foot_link">
			<a href="#">关于我们</a>
			<span>|</span>
			<a href="#">联系我们</a>
			<span>|</span>
			<a href="#">招聘人才</a>
			<span>|</span>
			<a href="#">友情链接</a>		
		</div>
		<p>CopyRight © 2019眼镜 信息技术有限公司 All Rights Reserved</p>
		<p>电话：010-****888    京ICP备*******8号</p>
	</div>
	
	<script src="js/jquery-2.2.3.min.js"></script>
	<script>
		$.post("orderServlet",{
			op:'getInfo',
			status:status
		},function(data){
			var str="";
			if( data.length<0 ){
				alert("请先添加地址");
			}else{
				for( var i =0;i<data.length;i++ ){
					if( data[i].status==1 ){
						str+='<li><span>用户名：</span>'+data[i].name+'</li>';
						str+='<li><span>联系方式：</span>'+data[i].tel+'</li>';
						str+='<li><span>联系地址：</span>'+data[i].province+data[i].city+data[i].area+'</li>';
					}
				}
			}
			$("#info").html(str);
		},"json");
		
	</script>
	
</body>
</html>